#!/bin/bash

# set -ux

# 变量
nodes=(server160 server161 server162)
user=root

for node in ${nodes[@]}; do
  echo "启动  $node zookeeper"
  ssh $user@$node zkServer.sh start
  ssh $user@$node zkServer.sh status
done

echo "查看jps"
jps

# ps -ef | grep java

# ps -ef | grep java | grep -v 'color' | awk '{print $2}' | xargs kill -9

# rm -rf /home/zookeeper/logs/*
